define([ "PDUtilDir/grid", "PDUtilDir/searchBlock" ],
		function(Grid, SearchBlock) {

			function init(cache, reserveInfoSupport, searchObj) {
				// SearchBlock.init('searchBlockId');
				// 初始化
				return Grid({
                    id : "CTOrderGirdDivId",
                    pageSize : 10,
                    index : true,
                    multi : true,
                    pagination : true,
                    cache : false,
                    layout : [ {
                        name : "组织名称",
                        field : "useDeptName",
                        sort : true,
                        click : function(e) {
                            reserveInfoSupport.run(e.data.row);
                        }
                    }, {
                        name : "订单号",
                        field : "id"
                    }, {
                        name : "车辆类型",
                        field : "carType",
                        sort : true,
                        format:function(e){
                            return cache.typeMap.get(e.row.carType);
                        }
                    }, {
                        name : "数量",
                        field : "carNumber",
                        width : "60px"
                    }, {
                        name : "预定状态",
                        field : "reserveStatus",
                        width : "80px",
                        format:function(e){
                            return cache.statuMap.get(e.row.reserveStatus);
                        }
                    }, {
                        name : "支付状态",
                        field : "payStatus",
                        width : "80px",
                        format:function(e){
                            return cache.payStatuMap.get(e.row.payStatus);
                        }
                    }, {
                        name : "总费用",
                        field : "totalCost",
                        width : "80px"
                    }, {
                        name : "用车时间",
                        field : "useDate",
                        width : "120px"
                    }, {
                        name : "还车时间",
                        field : "returnDate",
                        width : "120px"
                    } ],
                    toolbar : [
                        {
                            name : "查询",
                            icon : "fa fa-search",
                            callback : function(event) {
                                searchObj.run();
                            }
                        }
                    ],
                    data : {
                        type : "URL",
                        value : getServer()
                        + "/flea/hclv/car/reserve/getCarReserveList.htmls"
                    }
                });
			}
			return {
				init : init
			}
		});